import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { fas } from '@fortawesome/free-solid-svg-icons'
import { far } from '@fortawesome/free-regular-svg-icons'
import { fab } from '@fortawesome/free-brands-svg-icons'

export default defineNuxtPlugin((nuxtApp) => {
  // 添加图标到库中
  library.add(fas, far, fab)

  // 全局注册组件
  nuxtApp.vueApp.component('font-awesome-icon', FontAwesomeIcon)
})
